package at.codejedi.sto.gui.combat;

import java.text.DateFormat;
import java.util.Calendar;

import at.codejedi.sto.config.Configuration;
import at.codejedi.sto.model.combat.IPlayerBattle;

public class BattleCompareDetailView extends
		BattleStatisticsCompareView<IPlayerBattle> {

	private static final long serialVersionUID = -3103017026348419863L;

	@Override
	protected String getName(IPlayerBattle statistics, boolean uniqueName) {
		Calendar start = Calendar.getInstance();
		start.setTimeInMillis(statistics.getBeginningMillis());

		DateFormat sdf = Configuration.getDateTimeFormat();
		String name = sdf.format(start.getTime());
		return uniqueName ? name : name+" " + statistics.getPlayer().getPlayerName();
	}

}
